package com.shisfish.library.Impl;

import java.util.List;

import org.springframework.context.ApplicationContext;

import com.shisfish.library.Inter.IUtilInter;
import com.shisfish.library.Model.Util;
import com.shisfish.library.Utils.Global.GetACXmlUtils;

public class UtilImpl implements IUtilInter {

	private ApplicationContext ac = GetACXmlUtils.getACXml();
	private IUtilInter mapper = (IUtilInter) ac.getBean("utilMapper");
	
	@Override
	public int insertOne(Util t) {
		// TODO Auto-generated method stub
		return mapper.insertOne(t);
	}

	@Override
	public int insertAll(List<Util> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateOne(Util t) {
		// TODO Auto-generated method stub
		return mapper.updateOne(t);
	}

	@Override
	public int updateAll(List<Util> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Util> selectById(int id) {
		// TODO Auto-generated method stub
		return mapper.selectById(id);
	}

	@Override
	public List<Util> selectByKey(String key) {
		// TODO Auto-generated method stub
		return mapper.selectByKey(key);
	}

	@Override
	public int countAll() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Util> selectAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int deleteOneById(int id) {
		// TODO Auto-generated method stub
		return mapper.deleteOneById(id);
	}

	@Override
	public int deleteAllById(List<?> ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteOneByKey(String key) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllByKey(List<?> keys) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Util> selectByFcode(int fcode) {
		// TODO Auto-generated method stub
		return mapper.selectByFcode(fcode);
	}

	@Override
	public int deleteByFcode(int fcode) {
		// TODO Auto-generated method stub
		return mapper.deleteByFcode(fcode);
	}

	public Util getOne() {
		// TODO Auto-generated method stub
		return mapper.getOne();
	}

	public Util selectByName(String name) {
		// TODO Auto-generated method stub
		return mapper.selectByName(name);
	}

}
